home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
tbasmhlp.arc
/
MKINLINE.DOC
next >
Wrap
Text File
|
1987-07-27
|
2KB
|
78 lines
MKINLINE.EXE
by Matthew Dornquast
(Source is included for your amusement. Sell it, give it away, make a million,
trash your hard disk, etc. I don't care. It's yours.)
MKINLINE Takes a text file produced by debug's (U)nasemble option with
file redirection '>' and creates a nice little .BAS inline procedure for use
with turbo basic. When MKINLINE.EXE is included in your asemble batch file, it
can make life alot easier when developing assembly language routines for use
with your TURBO BASIC program.
I. [Creating a input file for use with MKINLINE] is done by unassembling a
.COM file with debug while redirecting debugs output to the input file.
Example: Enter> DEBUG MYPROG.COM >MYPROG.TXT
Then Enter> U<Enter> (This causes debug to unassemble your code.)
Then Enter> Q<Enter> (Exit debug)
Now MYPROG.TXT contains Unassembled the source code to MYPROG.COM. Please
note that you may have to type U<enter> many times before your com file
is completely unassembled.
II. [Creating a source file for $INCLUDE to your Turbo Basic program] is done
by running MKINLINE. Simply enter the source filename on the command line.
The output filename will be the same with the extension changed/added to
.BAS.
III. [Using created routine in Turbo Basic] is accomplished by the $include
metacommand.
[NOTE!] MKINLINE finds the end of your assembly language routine by either
a EOF mark [OR] the first POP BP instruction. Since any normal .ASM routine
designed to interface Turbo Basic would end this way, it is a handy way to
describe the end-of-source.
[Sample batch file that automates creating of INLINE.BAS file]
[Assumes path has been set to your MSDOS directory and your assembler is]
[in directory \MASM]
echo off
rem
rem assemble source code.
rem
\masm\masm %1;
rem
rem ask if he wants to make inline file (Maybe there were assemly errors so
rem this would be out of the questions)
rem
yorn Want to build a INLINE file
if errorlevel=1 goto end
rem
rem They said yes, so get to it.
rem
link %1.obj;
exe2bin %1.exe %1.com
erase %1.exe
erase %1.obj
debug %1.com <debugin.txt >%1.lst
mkinline %1.lst
erase %1.lst
rem
rem Move the source file created to their library of routines.
rem
copy %1.bas \tb\library >nul
erase %1.bas
erase %1.com
:end
[Sample input file for automation of DEBUG]
FILENAME:DEBUGIN.TXT
U<CR>U<CR>U<CR>U<CR>U<CR>U<CR>E<CR><EOF>